import Vue from 'vue';
import VueRouter from 'vue-router';
import Home from '../components/Home.vue';
import Provide from '../components/provide_inject/Provide.vue';
import ProxyEvent from '../components/event_proxy/ProxyEvent.vue';
import Dir from '../components/dir/Dir.vue';
Vue.use(VueRouter);

const routes = [
  {
    path: '/',
    redirect: '/home'
  },
  {
    path: '/home',
    component: Home,
    children: [
      {
        path: '/provide',
        component: Provide
      },
      {
        path: '/proxy',
        component: ProxyEvent
      },
      {
        path: '/directives',
        component: Dir
      }
    ]
  }
];

const router = new VueRouter({
  routes
});

export default router;
